import type { AppRouteModule } from '/@/router/types';
import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const admin: AppRouteModule = {
  path: '/admin',
  name: 'Admin',
  component: LAYOUT,
  redirect: '/admin/user',
  meta: {
    hideChildrenInMenu: false,
    icon: 'eos-icons:network-file-system',
    title: '系统',
    orderNo: 20,
  },
  children: [
    {
      path: 'user',
      name: 'User',
      component: () => import('/@/views/admin/index.vue'),
      meta: {
        title: '用户列表',
        icon: 'carbon:user-admin',
        hideMenu: false,
      },
    },
    {
      path: 'role',
      name: 'Role',
      component: () => import('/@/views/admin/role.vue'),
      meta: {
        title: '角色列表',
        icon: 'bx:bx-group',
        hideMenu: false,
      },
    },
    {
      path: 'auth',
      name: 'Auth',
      component: () => import('/@/views/admin/auth.vue'),
      meta: {
        title: '权限列表',
        icon: 'carbon:two-factor-authentication',
        hideMenu: false,
      },
    },
    {
      path: 'login',
      name: 'Login',
      component: () => import('/@/views/admin/action.vue'),
      meta: {
        title: '登录日志',
        icon: 'bx:bx-log-in',
        hideMenu: false,
      },
    },
    {
      path: 'config',
      name: 'Config',
      component: () => import('/@/views/config/index.vue'),
      meta: {
        title: '系统设置',
        icon: 'ant-design:setting-filled',
        hideMenu: false,
      },
    },
  ],
};

export default admin;
